# set -g prefix C-a
# unbind C-b
# bind C-a send-prefix
bind C-s set synchronize-panes
bind r source-file ~/.tmux.conf
bind n set -g status off
bind s set -g status on

set -g default-terminal "screen-256color"
# set-option -g default-shell /bin/zsh


setw -g mode-keys vi # emacs
set -g mouse on # mode-mouse on

set -g status-position top

set -g base-index 1
setw -g pane-base-index 1
set -g status-bg black
set -g status-fg white

set -g status-left '#[fg=green][#[fg=cyan]#S#[fg=green]]'
set -g status-left-length 20

set -g window-status-separator " "

set -g status-style "fg=#ebdbb2,bg=#282828"
set -g pane-border-style "fg=#ebdbb2"
set -g pane-active-border-style "fg=#d79921"

if-shell "test ! -d ~/.tmux/plugins/tpm" "echo 'clone tpm...'; git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm"

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'

run-shell "if which powerline-daemon > /dev/null; then powerline-daemon -q; fi"

if-shell "test -f /usr/lib/python3.5/site-packages/powerline/bindings/tmux/powerline.conf" "source-file /usr/lib/python3.5/site-packages/powerline/bindings/tmux/powerline.conf"
if-shell "test -f /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf" "source-file /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"

run '~/.tmux/plugins/tpm/tpm'
